<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@page import="com.dts.project.dao.CourierMasterDao"%>
<%@page import="java.util.Enumeration"%>
<%@page import="com.dts.core.util.CoreList"%>
<%@page import="com.dts.project.dao.ProductDetailsDao"%>
<%@page import="com.yourcompany.struts.form.ProductDetailsForm"%>
<%@page import="com.yourcompany.struts.form.CourierMasterForm"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
 
<html> 
	<head>
		<title>JSP for CourierDetailsForm form</title>
	</head>
	<%if(request.getParameter("status")!=null){ %>
	<%=request.getParameter("status") %><%} %>
	<body>
		<form action="CourierDetailsAction.jsp"><table align="center">
			<tr><td>AmtCharged:</td><td><input type=text name="amtCharged"/></td></tr> 
			<tr><td>itemId : </td><td><select name="itemId"/>
			<%String storepath=request.getRealPath("/images");
			ProductDetailsDao dao2=new ProductDetailsDao();
			CoreList cl2=dao2.ViewProductDetails(storepath);
			Enumeration en2=cl2.elements();
			while(en2.hasMoreElements())
			{
			ProductDetailsForm form2=(ProductDetailsForm)en2.nextElement();
			 %><option value="<%=form2.getItemId()%>"><%=form2.getItemName()%></option>
			 <%} %></select></td></tr>
			<tr><td>CourierId:</td><td><select name="courierId"/>
			<%CourierMasterDao dao=new CourierMasterDao();
			CoreList cl=dao.ViewAllCourierDetails();
			Enumeration en=cl.elements(); 
			while(en.hasMoreElements())
			{
			CourierMasterForm form=(CourierMasterForm)en.nextElement();
			%><option value="<%=form.getCourierId() %>"><%=form.getUserId() %></option>
			<%} %></select></td></tr> 
			<tr><td></td><td><input type=submit name="Register" value="Register"/></td></tr></table>
		</form>
	</body>
</html>

